package com.zm.damai.damaiindex.web.feign;

import com.zm.damai.damaiindex.web.feign.impl.UserActionImpl;
import com.zm.damaicommon.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "damai-user",fallback = UserActionImpl.class)
public interface UserAction {
    @RequestMapping("user")
    String way();

    @RequestMapping("hello")
    String hello(@RequestParam("name") String name);

    @RequestMapping("add")
    int add(@RequestParam("x") int x,@RequestParam("y") int y);

    @RequestMapping("sub/{x}/{y}")
    int sub(@PathVariable int x, @PathVariable int y);

    @RequestMapping("result")
    Result result(@RequestBody Result result);
}
